<template>
  <div>
  </div>
</template>
<script>
export default {
  extends: elmVueBase,
  props: {
    // ...
    code: {
      type: String,
      default: null
    },
    corpId:{
      type: String,
      default: null
    }
  },

  data() {
    return {
      code: null,
      res: null,
    }
  },
  watch: {
    code: function (oldVal, newVal) {
      alert(newVal)
      // this.key = newVal
      this.login(newVal)
    },
    corpId: function (oldVal, newVal) {
      this.corpId = newVal
      this.doRedirectUrl(newVal)
      //alert(newVal)
      // this.key = newVal
     // this.login(newVal)
    }
    // ...
  },
   mounted() {
   // console.log(top.location.href = elm.settings.routefix+elm.settings.loginPath)
     if (this.code) {
       this.login(this.code)
       return
     }
     this.doRedirectUrl(this.corpId)
  },
  methods: {

  }

};
</script>

